package be.sc.classicnetwork.model;

import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

import org.hibernate.annotations.Index;

/**
 * Base class for Code tables. Default discriminator is dtype.
 */
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public abstract class Code extends AbstractEntity {

	private static final long serialVersionUID = 477258264510794291L;

	@Index(name = "codeNameIndex")
	private String name;

	public Code() {
		super();
	}

	public Code(String id) {
		super(id);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}